package xj.graph2d;

import java.util.Map;

public abstract class AbstractModelListener implements ModelListener {

  protected AbstractModelListener() {
  }

  protected AbstractModelListener(Map iconMap) {
    this.iconMap = iconMap;
  }

  protected AbstractModelListener(Object model, DrawShape shape) {
    this(model, shape, null);
  }

  protected AbstractModelListener(Object model, DrawShape shape, Map iconMap) {
    this.model = model;
    this.shape = shape;
    this.iconMap = iconMap;
  }

  @Override
  public Object clone() throws CloneNotSupportedException {
    return super.clone();
  }

  public void set(Object model, DrawShape shape) {
    this.model = model;
    this.shape = shape;
  }

  public void set(Object model, DrawShape shape, Map iconMap) {
    this.model = model;
    this.shape = shape;
    this.iconMap = iconMap;
  }

  public void initModel() {
  }

  public void updateModel() {
  }

  public void updateShape() {
  }

  protected Object model;

  protected DrawShape shape;

  protected Map iconMap;

  protected static boolean debug = false; 

}
